<script lanuage='javascript'>
/*$(document).ready(function(){
    $('#registerBtn').bind('click',function(event){
        if( !checkUserName() ){
            return false;
        }
        if( !checkMobile() ){
            return false;
        }

        if( !checkPWD() ){
            return false;
        }

        if( !checkRepeatPassword() ){
            return false;
        }

        if( !chekEmail() ){
            return false;
        }
       $('#form1').submit();

    })


});*/
$(function(){
    var items_array2 = [
            { name:"login",type:"data[User][username]",simple:"用户名",focusMsg:'数字和英文及下划线和.的组合，开头为字母，4-20个字符'},
            { name:"password",type:'password',simple:"密码",focusMsg:'最小长度:6 最大长度:16'},
            { name:"confirm_password",type:'eq',to:'password',simple:"确认密码",focusMsg:'请再输入一遍您上面填写的密码'},
            { name:"email",type:"mail",simple:"Email",focusMsg:'请填写真实并且最常用的邮箱'}
    ];

    $("#form1").skygqCheckAjaxForm({
        items: items_array2
    });
});

</script>
<div id="region2" class="grid1col"><div id="reg_content">
	<div id="ul">
		<div class="li01"><strong>新用户注册</strong></div>
		<div class="li02"></div>
		<div class="li03"></div>
	</div>

  	<div class="ret_content_middle">
            <table class="table">
                <tr>
                <td width="16"><hr /></td>
                <td width="113" class="text_3db7e6"><strong>请填写详细信息</strong></td>
                <td width="520"><hr /></td>
                </tr>
            </table>
<?php echo $this->Form->create('users',array('action'=>'/doRegister','method'=>'POST','id'=>'form1','name'=>'form1','encoding' => null,'inputDefaults'=>array('label'=>false,'div'=>false)))?>
	    <table class="table">
          <tr>
            <td width="9" height="50" align="right"></td>
            <td width="123" align="right"><span class="text_FF3300">*</span>用户名：</td>
            <td>
                <?php echo $form->input('User.username',array('class'=>'sinput','onblur'=>'checkUserName(this.value)','maxlength'=>50,'size'=>30));?>
                <!---<input type="text" size="30" class="sinput" name="user_name" id="user_name" onblur="checkUserName(this.value)" onkeyup="CtoH(this)"/>--->
                <span id="checkusername" class="tip_msg">用户名由4-16个字符(包括中文、字母、数字</span>
            </td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>手机号码：</td>
            <td>
            <?php echo $form->input('User.mobilephone',array('class'=>'sinput','onblur'=>'checkMobile(this.value)','maxlength'=>11,'size'=>30));?>
            <!---<input name="mobile" id="mobile" type="text" size="30" class="sinput" dataType="int" onblur="checkMobile(this.value)" onkeyup="CtoH(this)"/>--->
            <span id="checkusermobile" class="tip_msg">手机号码是花集与您联系的重要方式。</span></td>
          </tr>
          <tr>

            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>密 码：</td>
            <td>
                <?php echo $form->input('User.password',array('class'=>'sinput','onblur'=>'checkPWD(this.value)','maxlength'=>16,'size'=>30));?>
                <!---<input name="password_id" type="password" size="30" class="sinput" id="password_id" onblur="checkPWD(this.value)" onkeyup="" onkeyup="CtoH(this)" maxlength='16'/>--->
                <span id="checkpassword" class="tip_msg">请输入密码,由字母和数字组成。</span>
            <!---<table border="0" cellspacing="0" style="vertical-align:bottom;display:none;">
              <tbody>
                <tr align="center">
                  <td id="pwd_lower" style="border-bottom: 2px solid rgb(218, 218, 218);" width="33%">弱</td>

                  <td id="pwd_middle" style="border-bottom: 2px solid rgb(218, 218, 218);" width="33%">中</td>
                  <td id="pwd_high" style="border-bottom: 2px solid rgb(218, 218, 218);" width="33%">强</td>
                </tr>
              </tbody>
            </table>--->
          </td>
          </tr>
          <tr>

            <td height="50"></td>
            <td align="right"><span class="text_FF3300">*</span>重复密码：</td>
            <td>
                <?php //echo $form->input('User.repeat_password',array('class'=>'sinput','onblur'=>'checkRepeatPassword(this.value)','maxlength'=>16,'size'=>30));?>
                <input name="repeat_password" id="repeat_password" type="password" size="30" class="sinput"  onblur="checkRepeatPassword(this.value)" maxlength='16'/>
                <span id="checkrepeatpassword" class="tip_msg">请再次输入密码。</span></td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><strong style="font-size:12px; color:#3db7e6;">　(选填)</strong>推荐花店号：</td>
            <td>
                <?php echo $form->input('User.flowershop_num',array('class'=>'sinput','maxlength'=>10,'size'=>30));?>
<!---<input name="uniqueid" id="uniqueid" type="text" size="30" class="sinput" value="" />--->
                <span class="tip_msg">推荐您注册的花店唯一号 如:1199530095</span></td>
          </tr>
          <tr>
            <td height="50"></td>
            <td align="right"><strong style="font-size:12px; color:#3db7e6;">　(选填)</strong>Email地址：</td>
            <td>
                <?php echo $form->input('User.email',array('class'=>'sinput','maxlength'=>64,'size'=>30));?>
<!---<input name="email" type="text" size="30" class="sinput" dataType="email" onkeyup="CtoH(this)"/>--->
                <span id="checkuseremail" class="tip_msg">花集会员优惠活动将通过email告知</span></td>
          </tr>

          <tr>
            <td height="70" colspan="3" align="center">
                <input type="button" value="" id="registerBtn" class="sbtn" style="background-image:url(/img/button.jpg); width:171px; height:32px; border:0; cursor:pointer" width="171" height="32"/>
            </td>
          </tr>
        </table>
<?php echo $this->Form->end();?>
  	</div>
	<div class="ret_foot"></div>
</div>
</div>